Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
node-dig-dns
Advanced tools
Using native node dns to query complex DNS is a hustle. This is a simple wrapper for the unix/linux/macos dig command (domain information grope). Output is parsed to JSON.
npm i node-dig-dns -S
dig([args], (options))
You can add all args from dig to the args array.
dig(['google.com', 'ANY'])
.then((result) => {
console.log(result)
})
.catch((err) => {
console.log('Error:', err);
});
Set custom DNS server:
dig(['@8.8.8.4','google.com', 'ANY'])
.then((result) => {
console.log(result)
})
.catch((err) => {
console.log('Error:', err);
});
Optional parameters:
The dig result is parsed and return in JSON:
{ question: [ [ ';google.com.', 'IN', 'ANY' ] ],
answer:
[ { domain: 'google.com.',
type: 'A',
ttl: '268',
class: 'IN',
value: '216.58.211.110' },
{ domain: 'google.com.',
type: 'AAAA',
ttl: '268',
class: 'IN',
value: '2a00:1450:400e:809::200e' },
{ domain: 'google.com.',
type: 'MX',
ttl: '568',
class: 'IN',
value: '30 alt2.aspmx.l.google.com.' },
...
],
time: 41,
server: '8.8.8.8#53(8.8.8.8)',
datetime: 'Mon Oct 9 23:56:37 2017',
size: 373 }
FAQs
Use dig command for DNS queries in node
The npm package node-dig-dns receives a total of 735 weekly downloads. As such, node-dig-dns popularity was classified as not popular.
We found that node-dig-dns demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.